<?php
$callback = $_GET['callback'];
$type = empty($_GET['type']) ? 1 : $_GET['type'];
$title = strtolower($_GET['title']);

$json_data = array();
if ($type == 1) {
    //搜索页面底部数据
    $json_data['t恤男'] = array(
    array(
        'sourceId'  => '231462',
        'title'     => '威狮格黑曼巴宽松T恤 青少年潮牌加大码男装圆领篮',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i1/TB1u2XgLpXXXXbMXpXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://detail.tmall.com/item.htm?id=526044889476&ns=1&abbucket=5',
        'price'     => '38',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '16夏季新款AFS JEEP专柜正品男士短袖t恤 宽松圆',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i4/TB1sXEAHXXXXXbhaXXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://detail.tmall.com/item.htm?id=37956860854&ns=1&abbucket=5',
        'price'     => '69',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '夏装新品男装圆V领纯棉印花T恤潮流T恤韩版男士修',
        'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/i3/TB1qPxjMpXXXXaHXFXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://detail.tmall.com/item.htm?id=37956860854&ns=1&abbucket=5',
        'price'     => '59',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '男士青少年夏季纯色休闲宽松T恤夏天学生港风体恤',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i1/1931803659/TB2xw54nXXXXXamXpXXXXXXXXXX_!!1931803659.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://item.taobao.com/item.htm?spm=a230r.1.14.70.oPs5nQ&id=530248172483&ns=1&abbucket=5#detail',
        'price'     => '72',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '2016夏季新品男士短袖t恤男纯棉圆领年青男装低调学',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i3/199598764/TB20m2qlVXXXXXxXXXXXXXXXXXX_!!199598764.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://item.taobao.com/item.htm?id=528365211108&ns=1&abbucket=5#detail',
        'price'     => '39',
        'flag'      => true
        ),
    );


    $json_data['t恤女'] = array(
    array(
        'sourceId'  => '231462',
        'title'     => '2016夏季新款个性短袖t恤女宽松显瘦五分袖圆领印花',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i2/2064306405/TB23armmFXXXXXRXpXXXXXXXXXX_!!2064306405.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://item.taobao.com/item.htm?id=529333463488&ns=1&abbucket=5#detail',
        'price'     => '13.78',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '春夏韩国简约时尚舒适显瘦性感不规则V字领修身短',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i1/TB1xYdiIFXXXXarXVXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://item.taobao.com/item.htm?id=520829933266&ns=1&abbucket=5#detail',
        'price'     => '46.9',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '2016夏季新款宽松显瘦五分袖t恤女毛球条纹装饰前短',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i4/831475896/TB2cIkSmpXXXXbRXpXXXXXXXXXX_!!831475896.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://item.taobao.com/item.htm?id=529437556887&ns=1&abbucket=5#detail',
        'price'     => '39',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '夏装新款韩版女装短袖T恤大码卡通条纹小衫 半袖学生',
        'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i1/TB1PVSAIFXXXXbCXVXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://detail.tmall.com/item.htm?spm=a230r.1.14.128.8Ja0Nz&id=520437840753&ns=1&abbucket=5',
        'price'     => '25',
        'flag'      => true
        ),
    array(
        'sourceId'  => '231462',
        'title'     => '艾格E&joy女装 2016夏季新品条纹圆领英文图案短袖t',
        'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/i4/TB1Om4iLVXXXXaDXXXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
        'href'      => 'http://detail.tmall.com/item.htm?spm=a230r.1.14.161.8Ja0Nz&id=528083250301&ns=1&abbucket=5',
        'price'     => '103',
        'flag'      => true
        ),
    );
} else if($type == 2){
    //搜索页面插入4个商品数据
    $json_data['t恤男'] = array(
        array(
            'sourceId'  => '231462',
            'title'     => '2016夏季新款男士短袖T恤 韩版休闲时尚简约白色纯',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i3/119540185825301633/TB2WLallFXXXXXSXpXXXXXXXXXX_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://detail.tmall.com/item.htm?spm=a230r.1.0.0.GW7IRk&id=527731325826&ns=1&abbucket=12',
            'price'     => '48.00',
            'shopName'  => 'fqlq旗舰店', 
            'city'      => '浙江 杭州',
			'sales'     => '14627',
            'shopUrl'   => 'https://click.simba.taobao.com/cc_im?spm=a230r.1.14.4.Z6Yugd&p=t%D0%F4%C4%D0&s=1082125447&k=397&e=8XJu87OX9T3nGgrvow%2Fzgxl%2BuoW3b9IRdo2OZm75SmMFhLP3CkvKO97wILvAwttMHvVIly74sfmuu4drPZUqxKVL%2BaPVoP3%2BF2Y2qdynIrCutK1F1WPBImUhn9C%2FJzXKNrVYm%2BGeGwvdygo8awWbdLs%2FPl9YgVQdMvdIIVJ4vOtiby5uqnD93GDqJdZVILyevouLlCASl6yDZLn8qhemMv0Waq4jX7mSw%2BqWCp0RmdQF%2Fs5sHmPijiXI0P40ZWuLA3cXdIKM2rnIwwp%2BBDoAiAthPO0Sl3vCc7JeZhgCZqArIGrPvR8v1PBockH9zmL%2FDhApbCYwgEKRY6XiDOTk%2BDRXuk1MTDN3hJc8s7azO5Yu1KVW3YTGA9c%2FEE0v53ibW3KXgGpssSs%3D',
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '2016夏季 男士短袖T恤 青少年修身印花体恤 半袖圆领',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i3/114080186110902994/TB2_FSJlFXXXXXJXpXXXXXXXXXX_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp',
            'href'      => 'https://click.simba.taobao.com/cc_im?p=t%D0%F4%C4%D0&s=133287464&k=353&e=vbKBTvY1OfjsPVdP5Wey%2FM9AfvTVDGoGtSHx7ZWPrqIoIscrXPzdm0DugsNfje9c9ykVIPOnNiGzxTG0%2BILWM3iEjWffhatGG1pLqGcVXuWRhuwPtX8W3lKr1hbsV5pLOJfsuOjw7r9lXadoeKdfL%2FhjE0%2BJ3Wx5K%2B9gi1mdIQ01nFbHYWvyARwQYqGd%2Bk6rGcXjEO1wZI3aWyq7%2BAFJDqXm3ZyHQfQ9EtxSdPxHP2iLpJyKpPovxOuLgx3Pw4LksqM%2BND9yNVLNNGIVm%2BPw6EYJ%2BVxrWQuMZQZfLebkZRof7F74h1jeQMShVb4jk3y5rKUAvQ6pLyq4U8%2BAHNH0w8K6014uifZs',
            'price'     => '79.00',
            'shopName'  => '黑扣子旗舰店',
            'city'      => '广东 广州',
			'sales'     => '1313',
            'shopUrl'   => 'https://click.simba.taobao.com/cc_im?spm=a230r.1.14.9.Z6Yugd&p=t%D0%F4%C4%D0&s=1082125447&k=397&e=7n96QGts4OHnGgrvow%2Fzgxl%2BuoW3b9IRdo2OZm75SmMFhLP3CkvKO97wILvAwttMHvVIly74sfn6I06BLb5jQ%2FnJSqxYm7T9%2Bk7LlQ5ggW%2ButK1F1WPBImUhn9C%2FJzXKNrVYm%2BGeGwvdygo8awWbdLs%2FPl9YgVQdMvdIIVJ4vOtiby5uqnD93GDqJdZVILyevouLlCASl6yDZLn8qhemMv0Waq4jX7mSw%2BqWCp0RmdSftAIMHqsCFocympi29JeA7P4%2BkmwN%2F7c2y6uXlq4G5DN5s6qcNKke0zZqldxlICpvkK7FJK4%2F%2FImJ3TyFLOqfrjrnpew62x0PsI8TjBdUezlv59hSCSqj%2FcMjznhcMi2nB%2FU3ZH%2Fe8OfJH98%2FEuRiVu3fZxqj4v4%3D',
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => 'moren 男装 短袖t恤 针织透气韩版修身时尚潮流服饰',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i3/115660173379528402/TB29IPwkVXXXXXZXpXXXXXXXXXX_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp',
            'href'      => 'https://item.taobao.com/item.htm?spm=a230r.1.0.0.Il5nFQ&id=525900111704&ns=1&abbucket=12#detail',
            'price'     => '69.00',
            'shopName'  => 'nzooow',
            'city'      => '广东 广州',
			'sales'     => '390',
            'shopUrl'   => 'https://click.simba.taobao.com/cc_im?spm=a230r.1.14.14.Z6Yugd&p=t%D0%F4%C4%D0&s=1082125447&k=409&e=O0JEG9T7YYTnGgrvow%2Fzgxl%2BuoW3b9IRdo2OZm75SmMFhLP3CkvKO97wILvAwttMHvVIly74sfkrqSCa5%2BgSYKYdSPkL3NbHNpI819hp5AmutK1F1WPBImUhn9C%2FJzXKNrVYm%2BGeGwvdygo8awWbdLs%2FPl9YgVQdMvdIIVJ4vOtiby5uqnD93GDqJdZVILyevouLlCASl6yDZLn8qhemMv0Waq4jX7mSw%2BqWCp0RmdQF%2Fs5sHmPijqc7NEaXueCqOchcJFpuGhoQvYKkkHFXbAtn8sfXe0m3SP81czJbr4Kw2vzTDsdaAqwzGA6ThQyqDhApbCYwgEJ50XJpeo8arFqSp1L5b9aQiUsZT%2F9PktIlOeo7LJCqGQzHkrdfMCkRljkZPnCYfz9muMen28tFSQ%3D%3D',
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '夏季简约纯棉韩版潮流圆领短袖打底体恤衫青春纯色',
            'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i4/74189987/TB2nxPSmVXXXXXGXXXXXXXXXXXX_!!74189987.jpg_360x360Q90.jpg_.webp',
            'href'      => 'https://item.taobao.com/item.htm?spm=a230r.1.0.0.s3Ooxz&id=527409103081&ns=1&abbucket=12#detail',
            'price'     => '67.00',
            'shopName'  => '比信数码',
            'city'      => '浙江 杭州',
			'sales'     => '1122',
            'shopUrl'   => 'https://store.taobao.com/shop/view_shop.htm?spm=a230r.1.14.21.Z6Yugd&user_number_id=74189987',
            'flag'      => true
            ),
    );


    $json_data['t恤女'] = array(
        array(
            'sourceId'  => '231462',
            'title'     => '宽松t恤女短袖夏季新款韩版简约纯色原宿风中袖体恤',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/i1/TB1kkaoLVXXXXXRaXXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://item.taobao.com/item.htm?id=528738323589&ns=1&abbucket=5#detail',
            'price'     => '8.70',
            'shopName'  => '盛世衣潮',
            'city'      => '广东 广州',
			'sales'     => '103',
            'shopUrl'   => 'https://store.taobao.com/shop/view_shop.htm?spm=a230r.1.14.6.Os9wlZ&user_number_id=2084536077',
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '包邮黄色海绵可爱卡通短袖女T恤大码宽松学生班服',
            'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i1/928470052/TB2YF0DkXXXXXXqXXXXXXXXXXXX_!!928470052.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://item.taobao.com/item.htm?id=45589613736&ns=1&abbucket=5#detail',
            'price'     => '23.00',
            'shopName'  => 'w馨怡2012',
            'city'      => '广东 广州',
			'sales'     => '50',
            'shopUrl'   => 'https://store.taobao.com/shop/view_shop.htm?spm=a230r.1.14.12.Os9wlZ&user_number_id=928470052',
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '木木家 日系夏季印花卡通米奇迪士尼圆领学生纯棉T',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/i8/TB1JCM.LVXXXXcwXFXXYXGcGpXX_M2.SS2_360x360Q90.jpg_.webp',
            'href'      => 'https://item.taobao.com/item.htm?spm=a230r.1.0.0.Ulvpz9&id=527423178414&ns=1&abbucket=12#detail',
            'price'     => '69.00',
            'shopName'  => 'candy52214',
            'city'      => '浙江 嘉兴',
			'sales'     => '35',
            'shopUrl'   => 'https://store.taobao.com/shop/view_shop.htm?spm=a230r.1.14.18.Os9wlZ&user_number_id=310420793',
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '2016夏季新款韩版女士短袖T恤修身打底衫猫头鹰钉',
            'media'     => 'http://g-search2.alicdn.com/img/bao/uploaded/i4/i4/805046248/TB20jGYlVXXXXbLXpXXXXXXXXXX_!!805046248.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://item.taobao.com/item.htm?id=528418942227&ns=1&abbucket=5#detail',
            'price'     => '67.00',
            'shopName'  => '华少chen1987',
            'city'      => '广东 广州',
			'sales'     => '39',
            'shopUrl'   => 'https://store.taobao.com/shop/view_shop.htm?spm=a230r.1.14.25.Os9wlZ&user_number_id=805046248',
            'flag'      => true
            ),
    );
} else if($type == 3){
    //商品搜索页面【掌柜热卖】插入2个
    $json_data['t恤男'] = array(
        array(
            'sourceId'  => '231462',
            'title'     => '2016夏季新款男士短袖T恤 韩版休闲时尚简约白色纯',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i3/119540185825301633/TB2WLallFXXXXXSXpXXXXXXXXXX_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://detail.tmall.com/item.htm?spm=a230r.1.0.0.GW7IRk&id=527731325826&ns=1&abbucket=12',
            'price'     => '48.00',
            'sales'     => '14627',   //销量
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '2016夏季 男士短袖T恤 青少年修身印花体恤 半袖圆领',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i3/114080186110902994/TB2_FSJlFXXXXXJXpXXXXXXXXXX_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp',
            'href'      => 'https://click.simba.taobao.com/cc_im?p=t%D0%F4%C4%D0&s=133287464&k=353&e=vbKBTvY1OfjsPVdP5Wey%2FM9AfvTVDGoGtSHx7ZWPrqIoIscrXPzdm0DugsNfje9c9ykVIPOnNiGzxTG0%2BILWM3iEjWffhatGG1pLqGcVXuWRhuwPtX8W3lKr1hbsV5pLOJfsuOjw7r9lXadoeKdfL%2FhjE0%2BJ3Wx5K%2B9gi1mdIQ01nFbHYWvyARwQYqGd%2Bk6rGcXjEO1wZI3aWyq7%2BAFJDqXm3ZyHQfQ9EtxSdPxHP2iLpJyKpPovxOuLgx3Pw4LksqM%2BND9yNVLNNGIVm%2BPw6EYJ%2BVxrWQuMZQZfLebkZRof7F74h1jeQMShVb4jk3y5rKUAvQ6pLyq4U8%2BAHNH0w8K6014uifZs',
            'price'     => '79.00',
            'sales'     => '1313',   //销量
            'flag'      => true
            ),
    );


    $json_data['t恤女'] = array(
        array(
            'sourceId'  => '231462',
            'title'     => '宽松t恤女短袖夏季新款韩版简约纯色原宿风中袖体恤',
            'media'     => 'http://g-search1.alicdn.com/img/bao/uploaded/i4/i1/TB1kkaoLVXXXXXRaXXXXXXXXXXX_!!0-item_pic.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://item.taobao.com/item.htm?id=528738323589&ns=1&abbucket=5#detail',
            'price'     => '8.70',
            'sales'     => '103',   //销量
            'flag'      => true
            ),
        array(
            'sourceId'  => '231462',
            'title'     => '包邮黄色海绵可爱卡通短袖女T恤大码宽松学生班服',
            'media'     => 'http://g-search3.alicdn.com/img/bao/uploaded/i4/i1/928470052/TB2YF0DkXXXXXXqXXXXXXXXXXXX_!!928470052.jpg_360x360Q90.jpg_.webp',
            'href'      => 'http://item.taobao.com/item.htm?id=45589613736&ns=1&abbucket=5#detail',
            'price'     => '23.00',
            'sales'     => '50',   //销量
            'flag'      => true
            ),
    );
}

echo $callback . '(' . json_encode($json_data[$title]) . ')';
?>